/**  
 * 文 件 名: IRightDAO.java  
 * 描    述：   
 * 版    权：Copyright (c)20012-2012 tongzhou All Rights Reserved.
 * 公    司: 同舟 
 * 作    者：彭定雄                     
 * 版    本: 1.0  
 * 创建时间: 2012-10-27
 *  
 * 修改历史：  
 * 时间                             作者                       版本                        描述  
 * ------------------------------------------------------------------  
 * 2012-10-27        彭定雄                1.0          1.0 Version  
 */        

/**
 * 
 */
package com.tongzhou.system.rightsMgmt.dao;

import java.util.List;
import java.util.Map;

import org.apache.commons.dbutils.ResultSetHandler;

import com.tongzhou.db.exception.DBException;
import com.tongzhou.system.rightsMgmt.model.Right;
import com.tongzhou.system.rightsMgmt.model.SearchRightCondition;

public interface IRightDAO {
	public List<Right> listRight(SearchRightCondition condition) throws DBException;
	public List<Right> checkRightByName(Right right) throws DBException;
	public void addRight(Right right) throws DBException;
	public void deleteRight(Right right) throws DBException;
	public void updateRight(Right right) throws DBException;
	public Right getRightById(Right right) throws DBException;
	public List<Right> getRightListByParentID(Right right) throws DBException;
	public List<Right> getRightListByParentID2(Right right) throws DBException;
	public <T> T addAccessControl(String userID,
			Map<String,String> dataMap,String sql,Object[] params,ResultSetHandler<T> rsh) throws DBException;
	public <T> T addAccessControl(String userID,
			Map<String,String> dataMap,String sql,Object[] params,ResultSetHandler<T> rsh,int startPos,int count) throws DBException;
	public <T> T addAccessControl2(String userID,Map<String,String> dataMap,
			String sql,String sql2,Object[] params,ResultSetHandler<T> rsh,int startPos,int count) throws DBException;
	public long getAccessControlCount(String userID,
			Map<String,String> dataMap,String sql,Object[] params) throws DBException;
	public String getAccessControlCount2(String userID, Map<String, String> dataMap,
			String sql, Object[] params) throws DBException;
}
